﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>省信息管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="/hdocs/css/cms.css" rel="stylesheet" type="text/css"/>
<script src="/hdocs/js/cms.js" type="text/javascript"></script>
<script src="/hdocs/js/prototype.js" type="text/javascript"></script>
<script src="/hdocs/js/region.js" type="text/javascript"></script>
<script type="text/javascript">
window.onload = function() {
	ZebraTable.stripe('provinces_table');
}
</script>
</head>
<body>
	<form id="mainForm" name="mainForm" action="/region/provinceQuery.jsp" method="post">
		<table class="formlist" width="500px">
			<tr>
				<th>省份：</th>
				<td style="text-align:left;">
					<input type="text" size="15" name="name" value="$!name"/>
				</td>
				<td style="text-align:left;">
					<input type="submit" class="cms_button" value="查询"/>
				</td>
				<td style="text-align:right;">
					<input type="button" class="cms_button" onclick="window.location.href='/region/provinceAdd.jsp'" value="添加"/>
				</td>
			</tr>
		</table>
	</form>
	<form id="optionForm" name="optionForm" action="/region/provinceDelete.jsp" method="post">
		<input type="hidden" id="provinceId" name="id" value=""/>
		<input type="hidden" id="provinceName" name="name" value="$!name"/>
	</form>
	<table id="provinces_table" class="datalist" width="100%">
		<thead>
			<tr>
				<th>ID</th>
				<th>省份</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			#foreach($province in $provinceList)
			<tr>
				<td>$province.id</td>
				<td>$province.name</td>
				<td>
					<a href="javascript:void(0)">编辑</a>
					<span>|</span>
					<a href="javascript:deleteProv($province.id)">删除</a>
				</td>
			</tr>
			#end
		</tbody>
	</table>
</body>
</html>
<script type="text/javascript">
function deleteProv(id){
	var provinceId = document.getElementById("provinceId");
	provinceId.value=id;
	var optionForm = document.getElementById("optionForm");
	optionForm.submit();
}
</script>

